package com.baor.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baor.domain.UserVo;
import com.github.yulichang.base.mapper.MPJJoinMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public interface UserDao extends MPJJoinMapper<UserVo> {

    List<UserVo> selectUserList(Map<String, Object> param);

    int pageCount(Map<String, Object> param);

    UserVo userInfo(int userId);

    int addUser(Map<String, Object> params);

    Integer selectUserId(Map<String, Object> params);

    int addUserRole(Map<String, Object> params);

    List<UserVo> checkAccount(Map<String, Object> params);

    List<Integer> selectSuperId(Map<String, Object> params);


    List<UserVo> selectSuperName(Map<String, Object> params);

    @Select("select * from t_user where user_account = #{userAccount}")
    public UserVo userLogin(UserVo vo);

    List<Integer> roleIds(int id);

    int updata(Map<String,Object> param);

    int deleteRole(int id);

    int insertRole(Map<String,Object> param);

    List<UserVo> superiors(Integer userId);

//    List<UserVo> superiors(Integer userId);
}
